<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/base.jsp"%>
<!-- 添加慢性病报销记录 -->
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">

<title>参合登记列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery-1.4.4.min.js"></script>
<script src="js/admin.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#add_btn").bind("click", function() {
			$('form').submit();
		});
	});
</script>
</head>
<body>
	<form method="post" class="form-x" action="<%=path%>/system/ChronicPayServlet?m=add" id="listform">
		<div class="panel admin-panel">
		<div class="panel-head" >
			<strong>参合登记信息</strong>
		</div>
			<table class="table table-hover text-center">
				<tr>	
					<th>序号</th>
					<th>参合证号</th>
					<th>家庭编号</th>
					<th>姓名</th>
					<th>身份证号</th>
					<th>性别</th>
					<th>年龄</th>
					<th>疾病名称</th>
					<th>家庭住址</th>
					<th>联系方式</th>
					<th>参合时间</th>
					<th>发票号</th>
				</tr>
				<%
					String cardId = request.getParameter("cardId");
					String pageNo = request.getParameter("pageNo");
					int p = pageNo == null ? 1 : Integer.parseInt(pageNo);
					RegisterDao dao = new RegisterDao();
					String sql = "select * from register where cardId='"+cardId+"'";
					Object[] params = {};
					Page pageBean = dao.queryOjectsByPage(sql, params, p,
							Constant.ROW);
				%>
				<%
						for (int i = 0; i < pageBean.getDatas().size(); i++) {
						Register model= (Register) pageBean.getDatas().get(i);
				%>
				<tr>
					<td><%=(i+1) %></td>
					<td><%=model.getPersCode()%></td>
					<td><%=model.getFamily().getFamCode()%></td>
					<td><%=model.getPersName() %></td>
					<td><%=model.getCardId() %></td>
					<td><%=model.getSex()%></td>
					<td><%=model.getAge() %></td>
					<td><%=model.getIllName() %></td>
					<td><%=model.getLiveAddress() %></td>
					<td><%=model.getTelephone() %></td>
					<td><%=model.getCreateTime() %></td>
					<td><%=model.getInvoice() %></td>
				</tr>
				
			</table>
	</div>
	</br>
	<!-- 填写报销信息 -->
	<div class="panel admin-panel">
	  <div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>增加慢性病报销记录</strong>
		</div>
				</br>
				<div class="form-group">
					<div class="label">
						<label>姓名：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" readonly="readonly" value="<%=model.getPersName()%>" name="persName"
							data-validate="required:请输入姓名" />
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>身份证号：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" readonly="readonly" value="<%=model.getCardId()%>" name="cardId"
							data-validate="required:请输入身份证号" />
						<div class="tips"></div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="label">
						<label>疾病名称：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" readonly="readonly" value="<%=model.getIllName()%>" name="illName"
							data-validate="required:请输入疾病名称" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>住院费用：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="" name="money"
							data-validate="required:请输入住院费用" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>报销时间：</label>
					</div>
					<div class="field">
						<input type="date" class="input w50" value="" name="payTime"
							data-validate="required:请输入报销时间" />
						<div class="tips"></div>
					</div>
				</div>
			
				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o"
							type="button">提交</button>
					</div>
				</div>	
				<%
					}
				%>
	</div>
	</form>
</body>
</html>
